<?php

namespace App\Transformers\StoreCoupon;

use App\Models\StoreCouponIssueUser;
use League\Fractal\TransformerAbstract;

class StoreCouponIssueUserTransformer extends TransformerAbstract
{
    public function transform(StoreCouponIssueUser $data){
        return [
            'id' => $data->id,
            'user_id' => $data->user_id ?? '',
            'issue_coupon_id' => $data->issue_coupon_id ?? '',
            'created_at' => $data->created_at ? $data->created_at->format("Y-m-d H:i:s") : '',
            'updated_at' => $data->updated_at ? $data->updated_at->format("Y-m-d H:i:s") : '',
        ];
    }

}
